package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Message;
import cn.wolfcode.trip.base.query.MessageQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface MessageMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Message entity);

    Message selectByPrimaryKey(Long id);

    List<Message> selectAll();

    int updateByPrimaryKey(Message entity);

    List<Map> selectChartPerson(@Param("id") Long id);

    List<Message> selectChartMessages(MessageQueryObject qo);

    List<Message> selectNewChartMessages(MessageQueryObject qo);

    void saveMessage(Message message);

    int selectMessageCount(Long receiverId);

    List<Map> selectChartCount(Long id);

    void updateState(@Param("id") Object id, @Param("state") Boolean state);
}